import request from '@/utils/request'

export function loginByOpenid(params) {
  return request({
    url: '/openApi/user/loginByOpenid',
    method: 'get',
    params: params
  })
}

export function getOpenid(params) {
  return request({
    url: '/openApi/user/getOpenid',
    method: 'get',
    params: params
  })
}

export function userFindUser(params) {
  return request({
    url: '/userApi/user/findUser',
    method: 'get',
    params: params
  })
}

export function userUpdateUser(data) {
  return request({
    url: '/userApi/user/updateUserById',
    method: 'put',
    data: data
  })
}

export function openInsertUser(data) {
  return request({
    url: '/openApi/user/insertUser',
    method: 'post',
    data: data
  })
}

export function userCreateToken(params) {
  return request({
    url: '/testApi/user/createToken',
    method: 'get',
    params: params
  })
}

export function userSelectTeamStudentByStudentId(params) {
  return request({
    url: '/userApi/teamStudent/selectTeamStudentByStudentId',
    method: 'get',
    params: params
  })
}